# 1 FIFO queue

# import queue
#
# q = queue.Queue(3)
# q.put(1)
# q.put(2)
# q.put('太白')
# # q.put(666)
#
# print(q.get())
# print(q.get())
# print(q.get())


# LIFO 栈.
# import queue
#
# q = queue.LifoQueue()
# q.put(1)
# q.put(3)
# q.put('barry')
#
# print(q.get())
# print(q.get())
# print(q.get())
# print(q.get())


# 优先级队列
# 需要元组的形式,(int,数据) int 代表优先级,数字越低,优先级越高.
# import queue
# q = queue.PriorityQueue(3)
#
# q.put((10, '垃圾消息'))
# q.put((-9, '紧急消息'))
# q.put((3, '一般消息'))
#
# print(q.get())
# print(q.get())
# print(q.get())
